home *** CD-ROM | disk | FTP | other *** search
- Path: news.deltanet.com!usenet
- From: olivas@deltanet.com (Sergio Olivas)
- Newsgroups: comp.lang.c++
- Subject: Are Pure Functions always Virtual????
- Date: Fri, 05 Jan 1996 08:01:23 GMT
- Organization: Delta Internet Services, Anaheim, CA
- Message-ID: <4cilse$5li@news2.deltanet.com>
- NNTP-Posting-Host: ana2066.deltanet.com
- X-Newsreader: Forte Free Agent 1.0.82
-
-
- I have a base class for accessing databases (BC++), the base class is
- made of only pure virtual functions. Two derived classes are written,
- one for accessing databases through the Paradox Engine, the other
- using the Borland Database Engine.
-
- Since I've heard that using virtual functions really eats into the 64k
- automatic data segment, as well as adding overhead, is the 'virtual'
- keyword really needed. -- and does it make any difference, assuming
- I'm not going to further derive another class from the newly derived
- class (in this case DB_BASE_PDX) ???
-
- eg..
- class DB_BASE {
- { ...
- virtual int NextRecord(int TableID) = 0;
- ..^^^^^ is this needed?
- };
-
- The derived classes are something like
- class DB_BASE_PDX : public DB_BASE
- {
- ...
- int NextRecord(int TableID);
- ...
- }
-
- Thanks,
- Sergio Olivas
-
-
-
-
-
-